set PAIRS;
set LINKS;
set ROUTES;


# Matrix describing wheather a certain
# Link belongs to a given ROUTE for a Nodepair
param delta {LINKS,ROUTES, PAIRS } binary default 0; 

# Desired wavelengths for a given nodepair
param d {PAIRS} ; 

#param s {LINKS} binary default 1;



var N integer;

#var y {LINKS, LINKTYPES} integer >=0;

var x {PAIRS, ROUTES} integer >=0;

minimize wavelengths: 
N ;


subject to TrafficDemand {m in PAIRS, l in LINKS}: 
sum {r in ROUTES} x[m,r]*(1-delta[l,r,m]) >= d[m] ;

subject to Nmax {l in LINKS}:
sum {m in PAIRS, r in ROUTES} delta[l,r,m] * x[m,r] <= N ;




